package edu.wfu.preparedDishes.commodity.service;

import com.baomidou.mybatisplus.extension.service.IService;

import edu.wfu.preparedDishes.commodity.entity.CartEntity;
import edu.wfu.preparedDishes.commodity.entity.CartVo;
import edu.wfu.preparedDishes.commodity.entity.commodityVo;
import edu.wfu.preparedDishes.common.utils.PageUtils;

import java.util.List;
import java.util.Map;

/**
 * 购物车记录表;
 *
 * @author hero_miracle
 * @email hero_miracle@gmail.com
 * @date 2023-11-22 13:06:46
 */
public interface CartService extends IService<CartEntity> {

    Integer getNum(String userId);

    List<CartVo> queryList(int pageSize, int offset, String userId);

    PageUtils queryPage(Map<String, Object> params);

    void add(String id);
    void addMore(String id,Integer num);
    void reduce(String id);

    Integer sum(String userId);

    CartEntity isHave(String skuId,String userId);
}

